{% extends "counterpoint/forum_base.html" %}

{% block title %}{% if thread %}Reply{% else %}New Topic{% endif %} - {{ block.super }}{% endblock %}

{% block bodyattribs %} onload="document.message.{% if thread %}body{% else %}title{% endif %}.focus()"{% endblock %}

{% block breadcrumbs %}{{ block.super }} &raquo; <a href="{{ forum.get_absolute_url }}">{{ forum }}</a> &raquo; {% if thread %}Reply{% else %}New Topic{% endif %}{% endblock %}
{% block breadcrumbs2 %}{{ block.super }} &raquo; <a href="{{ forum.get_absolute_url }}">{{ forum }}</a> &raquo; {% if thread %}Reply{% else %}New Topic{% endif %}{% endblock %}

{% block content %}
        <form name="message" method="post" action=".">
          <table>
            <tr class="row2"><td colspan="4">&nbsp;</td></tr>
            <tr class="row2">
              <td>&nbsp;</td>
              <td class="post_label">
{% if thread %}
                Reply To
{% else %}
                {{ form.title.label_tag }}
{% endif %}
              </td>
              <td class="post_input">
{% if thread %}
                {{ thread }}
{% else %}
                {{ form.title }}{% if form.title.errors %}<span class="error">* {{ form.title.errors|join:", " }}</span>{% endif %}
{% endif %}
              </td>
              <td>&nbsp;</td>
            </tr>
            <tr class="row2">
              <td>&nbsp;</td>
              <td class="post_label">
                {{ form.body.label_tag }}
              </td>
              <td class="post_input">
                {{ form.body }}{% if form.body.errors %}<span class="error">* {{ form.body.errors|join:", " }}</span>{% endif %}
              </td>
              <td>&nbsp;</td>
            </tr>
            <tr class="row2">
              <td>&nbsp;</td>
              <td class="post_label">&nbsp;</td>
              <td class="post_input post_submit">
                <div id="markdown_help_link"><a href="http://daringfireball.net/projects/markdown/syntax" target="_blank">markdown</a> formatting allowed</div>
                <input type="submit" value="Post Now" />
              </td>
              <td>&nbsp;</td>
            </tr>
{% if perms.forum.change_post %}
            <tr class="row2">
              <td>&nbsp;</td>
              <td class="post_label">Options</td>
              <td class="post_input">
                {{ form.sticky }} {{ form.sticky.label_tag }}
                {{ form.locked }} {{ form.locked.label_tag }}
              </td>
              <td>&nbsp;</td>
            </tr>
{% endif %}
            <tr class="row2"><td colspan="4">&nbsp;</td></tr>
          </table>
        </form>
{% endblock %}
